package com.panshi.service;

import com.panshi.vo.ArticleT;
import com.panshi.vo.DataResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@Controller
@Api(tags = "zx-后台资讯管理")
@FeignClient(value = "hasbei-sys-provider",contextId = "zx")
public interface IZxApp {

    @ApiOperation("zx-查询所有资讯")
    @GetMapping("/zx-app/list")
    public DataResult findArticle();

    @ApiOperation("zx-根据id查询资讯")
    @GetMapping("/zx-app/byid/{id}")
    public ArticleT getZxbyId(@PathVariable("id") Integer id);

    @ApiOperation("zx-增加资讯")
    @PostMapping("/zx-app/add")
    public Boolean add(@Validated ArticleT articleT);

    @ApiOperation("zx-删除资讯")
    @GetMapping("/zx-app/del/{id}")
    public Boolean del(@PathVariable("id") Integer id);

    @ApiOperation("zx-修改资讯")
    @PostMapping("/zx-app/upd")
    public Boolean upd(@Validated ArticleT articleT);

}
